package com.htyy.yutao.myapplication1;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.htyy.yutao.flyn.Eyes;

/**
 * Created by Asus on 2018/7/23.
 */

public class StatusBarWhiteCoordinatorActivity extends AppCompatActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_statusbar_white_coordinator);
        Toolbar toolbar = findViewById(R.id.toolbar);
        getSupportActionBar().hide();//隐藏掉整个ActionBar
//        setSupportActionBar(toolbar);
//        getSupportActionBar().setTitle("StatusBar White whith CoordinatorLayout");

        AppBarLayout mAppBarLayout = findViewById(R.id.appbar);
        CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_layout);
        collapsingToolbarLayout.setTitle(getString(R.string.appbar_name));

        Eyes.setStatusBarColorForCollapsingToolbar(this, mAppBarLayout, collapsingToolbarLayout, toolbar, ContextCompat.getColor(this, R.color.colorPrimary));
    }
}
